/**   
 * api接口统一管理
 */
import {
	get,
	post
} from './http'


export const getCodeReq = p => get('/common/getCode', p);  //发送手机验证码
export const apiBanner = p => get('/app/banner/list', p);  //banner接口
export const apiLogin = p => post('/app/auth/login', p);  //登录接口
export const apiShopTypeList = p => get('/app/shop/getShopTypeList', p);  //获取店铺类型列表
export const apiAddressList = p => get('/app/address/getAddressList', p);  //获取获取校区或宿舍列表
export const apiAppUserInfo = p => get('/app/user/getAppUserInfo', p);  //获取用户数据
export const apiUpload = p => post('/common/upload', p);  //上传文件
export const apiUpdateAppUser = p => post('/app/user/updateAppUser', p);  //更新用户数据
export const apiUserAddressList = p => get('/app/user/getAppUserAddressList', p);  //获取用户收货地址列表
export const apiInsetAppUserAddress = p => post('/app/user/insetAppUserAddress', p);  //添加用户收货地址
export const apiUpdateAppUserAddress = p => post('/app/user/updateAppUserAddress', p);  //编辑更新用户收货地址
export const apiDeleteAppUserAddress = p => post('/app/user/deleteAppUserAddress', p);  //删除用户收货地址

// 帖子：
export const apiUserFollowList = p => get('/app/forum/article/userFollowList', p);  //获取关注用户帖子列表
export const apiNewestList = p => get('/app/forum/article/newestList', p);  //获取最新的帖子列表
export const apipublish = p => post('/app/forum/article/publish', p);  //发布帖子
export const apiArticleDetails = p => get('/app/forum/article/details', p);  //帖子详情
export const apiArticleCommentList = p => get('/app/forum/comment/articleCommentList', p);  //帖子评论列表详情
export const apiPublishArticleComment = p => post('/app/forum/comment/publishArticleComment', p);  //发布帖子的评论
export const apiPublishReply = p => post('/app/forum/comment/publishReply', p);  //发布评论的回复
export const apiReplyList = p => get('/app/forum/comment/replyList', p);  //通过评论id获取回复列表
export const apiAddCommentLike = p => post('/app/forum/like/addCommentLike', p);  //点赞/取消点赞评论
export const apiAddArticleLike = p => post('/app/forum/like/addArticleLike', p);  //点赞/取消点赞帖子
export const apiInsertReport = p => post('/app/report/insertReport', p);  //发起举报
export const apiTypeList = p => get('/app/report/typeList', p);  //获取举报分类列表
export const apiGetInfo = p => post('/app/report/getInfo', p);  //获取举报详情
export const apiCancel = p => post('/app/follow/cancel', p);  //取消关注用户
export const apiAdd = p => post('/app/follow/add', p);  //关注用户
export const apiRelation = p => get('/app/follow/relation', p);  //获取是否关注对方
export const apiDelete = p => post('/app/forum/article/delete', p);  //删除用户帖子-单个删除
export const apiBatchDelete = p => post('/app/forum/article/batchDelete', p);  //删除用户帖子-批量删除
export const apiDeleteCommentById = p => post('/app/forum/comment/deleteCommentById', p);  //删除评论 
export const apiDeleteReplyById = p => post('/app/forum/comment/deleteReplyById', p);  //删除回复
export const apiGetUserShopDetails = p => post('/app/shop/getUserShopDetails', p);  //获取用户店铺详情
export const aipGetMessageUnReadNum = p => get('/app/message/getMessageUnReadNum', p);  //获取未读消息数量
export const apiClearMessageUnReadNum = p => post('/app/message/clearMessageUnReadNum', p);  //消息设为已读
export const apiGetMessageStatus = p => get('/app/message/getMessageStatus', p);  //获取未读消息状态
export const apiClearMessage = p => post('/app/message/clearMessage', p);  //清空消息  
export const apiLikeMessageList = p => get('/app/message/likeMessageList', p);  //获取点赞我的消息列表
export const apiLikeRecordList = p => get('/app/message/likeRecordList', p);  //获取我点赞的消息列表
export const apiUserPublishList = p => get('/app/forum/article/userPublishList', p);  //获取用户发布的帖子列表
export const apiGetAppUserInfoById = p => get('/app/user/getAppUserInfoById', p);  //通过userId获取用户数据-别人的
export const apiCommentMessageList = p => get('/app/message/commentMessageList', p);  //获取评论我的消息列表
export const apiCommentRecordList = p => get('/app/message/commentRecordList', p);  //获取我的评论消息列表
export const apiSysMessageList = p => get('/app/message/sysMessageList', p);  //获取系统消息列表
export const apiSysMessageDetails = p => get('/app/message/sysMessageDetails', p);  //获取系统消息详情
export const apiGetAppUserInfo = p => get('/app/user/getAppUserInfo', p);  //获取用户数据-自己的
export const apiPrivateAgreement = p => get('/config/private/agreement', p);  //获取隐私协议
export const apiFollowUserList = p => get('/app/follow/followUserList', p);  //获取关注用户列表
export const apiFansUserList = p => get('/app/follow/fansUserList', p);  //获取粉丝用户列表
export const apiAboutUs = p => get('/config/platform/about/us', p);  //关于我们
export const apiUserAgreement = p => get('/config/user/agreement', p);  //获取用户协议


// 商铺：
export const apiGetDayRecShopList = p => get('/app/shop/getDayRecShopList', p);  //获取日推店铺列表-首页
export const apiGetShopList = p => get('/app/shop/getShopList', p);  //获取店铺列表
export const apiGetGoodsTypeList = p => get('/app/goodsType/getGoodsTypeList', p);  //通过店铺id获取商品类型列表
export const apiGetShopDetails = p => get('/app/shop/getShopDetails', p);  //获取店铺详情
export const apiGetGoodsList = p => get('/app/goods/getGoodsList', p);  //获取商品列表
export const apiGetGoodsDetails = p => get('/app/goods/getGoodsDetails', p);  //获取商品详情-用户
export const apiGetPlatformGoodsDetails = p => get('/app/platform/goods/goodsDetails', p);  //获取商品详情-商户
export const apiEnterApplyDetails = p => get('/app/enter/enterApplyDetails', p);  //商家入驻申请详情
export const apiExplainApply = p => get('/config/explain/apply', p);  //获取商家申请说明
export const apiAgreement = p => get('/config/enter/agreement', p);  //获取商家入驻协议
export const apiRentComboList = p => get('/app/enter/rentComboList', p);  //查询租期套餐列表
export const apiEnterApply = p => post('/app/enter/enterApply', p);  //商家入驻申请
export const apiUserEnterOrderPay = p => post('/app/pay/userEnterOrderPay', p);  //商家入驻订单支付
export const apiUpdateShopList = p => post('/app/shop/updateShopList', p);  //填写、修改店铺信息
export const apiShopGoodsOrderPay = p => post('/app/pay/shopGoodsOrderPay', p);  //店铺商品订单支付
export const apiPlatformGoodsOrderPay = p => post('/app/pay/platformGoodsOrderPay', p);  //店铺商品订单支付 -平台
export const apiAddGoodsType = p => post('/app/goodsType/addGoodsType', p);  //添加商品类型
export const apiDelGoodsType = p => post('/app/goodsType/delGoodsType', p);  //删除商品类型
export const apiEditGoodsType = p => post('/app/goodsType/editGoodsType', p);  //修改商品类型
export const apiRecGoods = p => post('/app/goods/recGoods', p);  //推荐商品
export const apiDelGoods= p => post('/app/goods/delGoods', p);  //删除商品
export const apiPlatformOrderList = p => get('/app/platform/order/list', p);  //获取商家入驻协议
export const apiGetFromUserGoodsOrderList = p => get('/app/order/getFromUserGoodsOrderList', p);  //获取买家用户商品订单列表
export const apiGetToUserGoodsOrderList = p => get('/app/order/getToUserGoodsOrderList', p);  //获取卖家用户商品订单列表
export const apiGetUserGoodsOrderDetails = p => get('/app/order/getUserGoodsOrderDetails', p);  //获取商品订单详情
export const apiTimeSetting = p => get('/config/order/time/setting', p);  //订单失效时间
export const apiUpdateGoodsOrderStatus = p => post('/app/order/updateGoodsOrderStatus', p);  //修改商品订单状态
export const apiGetAppRefundReasonList = p => get('/config/refund/getAppRefundReasonList', p);  //获取退款原因列表
export const apiRefundcreateRefundOrder = p => post('/app/refund/createRefundOrder', p);  //创建退款订单
export const apiCommentPublish = p => post('/app/order/comment/publish', p);  //发布订单商品评价
export const apiGetGoodsCommentList = p => post('/app/order/comment/getGoodsCommentList', p);  //获取商品评价
export const apiToUserOrderRefundList = p => get('/app/refund/toUserOrderRefundList', p);  //查询卖家用户售后订单列表
export const apiUserOrderRefundDetails = p => get('/app/refund/userOrderRefundDetails', p);  //获取退款订单详细信息
export const apiFromUserOrderRefundList = p => get('/app/refund/fromUserOrderRefundList', p);  //查询买家用户售后订单列表
export const apiUpdateRefundOrderStatus = p => post('/app/refund/updateRefundOrderStatus', p);  //修改退款订单状态
export const apiGetUserTodayEarning = p => get('/app/order/getUserTodayEarning', p);  //获取商家当日收入数据
export const apiDownGoods = p => post('/app/goods/downGoods', p);  //下架商品


// 商铺用户购物车： 
export const apiAddCartGoods = p => post('/app/goods/cart/addCartGoods', p);  //添加商品到购物车-用户端
export const apiClearCartGoods = p => post('/app/goods/cart/clearCartGoods', p);  //通过店铺id清空购物车
export const apiGetCartGoodsList = p => get('/app/goods/cart/getCartGoodsList', p);  //通过店铺id获取购物车商品列表
export const apiUpdateCartGoodsNum = p => post('/app/goods/cart/updateCartGoodsNum', p);  //修改购物车商品数量

//平台用户购物车：
export const apiPlatformAddCartGoods = p => post('/app/platform/goods/addCartGoods', p);  //添加商品到购物车-用户端
export const apiPlatformClearCartGoods = p => post('/app/platform/goods/clearCartGoods', p);  //通过店铺id清空购物车
export const apiPlatformGetCartGoodsList = p => get('/app/platform/goods/getCartGoodsList', p);  //购物车商品列表
export const apiPlatformUpdateCartGoodsNum = p => post('/app/platform/goods/updateCartGoodsNum', p);  //修改购物车商品数量

//优惠券：
export const apiShopCouponListByShopId = p => get('/app/coupon/shopCouponListByShopId', p);  //查询店铺优惠券列表-用户
export const apiShopCouponListCoupon = p => get('/app/coupon/shopCouponList', p);  //查询店铺优惠券列表-商户自己
export const apiDeleteShopCoupon = p => post('/app/coupon/deleteShopCoupon', p);  //删除店铺优惠券
export const apiBlankCouponList = p => get('/app/coupon/blankCouponList', p);  //查询平台空白优惠券套餐列表
export const apiAddShopCoupon = p => post('/app/coupon/addShopCoupon', p);  //添加店铺优惠券
export const apiCouponOrderPay = p => post('/app/pay/couponOrderPay', p);  //空白优惠券购买订单支付

//订单：
export const apiCreateGoodsPreOrder = p => post('/app/order/createGoodsPreOrder', p);  //创建商品预付款订单
export const apiPlatformCreateGoodsPreOrder = p => post('/app/platform/order/createGoodsPreOrder', p);  //创建商品预付款订单-平台

export const apiCreateRechargePreOrder = p => post('/app/wallet/recharge/createRechargePreOrder', p);  //创建商品预付款订单
export const apiRechargeOrderOrderPay = p => post('/app/pay/rechargeOrderOrderPay', p);  //商家充值订单支付
export const apiApplyFetch = p => post('/app/wallet/fetch/applyFetch', p);  //申请提现
export const apiGetFetchConfig = p => get('/app/wallet/fetch/getFetchConfig', p);  //获取提现配置
export const apiGetUserBankList = p => get('/app/wallet/bank/getUserBankList', p);  //银行卡列表
export const apiAddUserBank = p => post('/app/wallet/bank/addUserBank', p);  //添加用户银行卡
export const apiDeleteUserBank = p => post('/app/wallet/bank/deleteUserBank', p);  //删除用户银行卡
export const apiExplainCash = p => get('/config/explain/cash', p);  //获取押金规则说明
export const apiCashRecordList = p => get('/app/wallet/rec/cashRecordList', p);  //查询押金记录列表
export const apiWalletFetchList = p => get('/app/wallet/fetch/list', p);  //查询提现记录列表
export const apiWalletFetchGetInfo = p => get('/app/wallet/fetch/getInfo', p);  //查询提现记录详细信息
export const apiExplainEarnings = p => get('/config/explain/earnings', p);  //获取收益到账说明
export const apiEarningRecordList = p => get('/app/wallet/rec/earningRecordList', p);  //获取用户收益记录
export const apiBillRecordList = p => get('/app/wallet/rec/billRecordList', p);  //查询用户账单列表


//商户：
export const apiPlatformTypeList = p => get('/app/platform/goods/typeList', p);  //获取平台商品类型列表
export const apiPlatformGoodsList = p => get('/app/platform/goods/goodsList', p);  //获取平台商品列表
export const apiPlatformGetUserShopDetails = p => get('/app/shop/getUserShopDetails', p);  //获取用户店铺详情
export const apiPlatformRentComboList = p => get('/app/enter/rentComboList', p);  //查询租期套餐列表
export const apiPlatformShopRenew = p => post('/app/enter/shopRenew', p);  //店铺租期续租
export const apiUserRenewEnterOrderPay = p => post('/app/pay/userRenewEnterOrderPay', p);  //商家续租订单支付
export const apiShopRecGetDayRecInfo = p => get('/app/shop/rec/getDayRecInfo', p);  //查询日推套餐列表
export const apiGetVipRecInfo = p => get('/app/shop/rec/getVipRecInfo', p);  //获取首次末推
export const apiCreateRecPreOrder = p => post('/app/shop/rec/createRecPreOrder', p);  //创建推广预付款订单
export const apiPayRecOrderPay = p => post('/app/pay/recOrderPay', p);  //首次末日推订单支付
export const apiAddOrEditGoods = p => post('/app/goods/addOrEditGoods', p);  //添加或修改商品信息
export const apieditGoodsTypeOrderNum = p => post('/app/goodsType/editGoodsTypeOrderNum', p);  //修改商品类型顺序
export const apiBalance = p => get('/config/explain/balance', p);  //获取余额到账说明
export const apiInitAppUserPayPassword = p => post('/app/user/initAppUserPayPassword', p);  //初始用户支付密码
export const apiUpdateAppUserPayPassword = p => post('/app/user/updateAppUserPayPassword', p);  //更新用户支付密码
export const apiForgetAppUserPayPassword = p => post('/app/user/forgetAppUserPayPassword', p);  //忘记用户支付密码
export const apiCheckPayPassword = p => post('/app/user/checkPayPassword', p);  //校验支付密码是否正确

//搜索相关：
export const apiHomeSearch = p => get('/app/search/homeSearch', p);  //首页搜索
export const apiUserHistorySearchList = p => get('/app/search/userHistorySearchList', p);  //获取用户历史搜索列表
export const apiClearUserHistorySearch = p => get('/app/search/clearUserHistorySearch', p);  //清空用户历史搜索
export const apiDelUserHistorySearch = p => get('/app/search/delUserHistorySearch', p);  //删除单个用户历史搜索

